lyon_path 0.4.1

A simple and optional path data structure that can be used with the rest of the lyon crates.
Documentation

Lyon path

A simple path data structure implementing the traits provided in the lyon_path_builder and lyon_path_iterator modules.

Examples

# extern crate lyon_core;
# extern crate lyon_path;
# extern crate lyon_path_builder;
# extern crate lyon_path_iterator;
# fn main() {
use lyon_path::Path;
use lyon_core::math::{point};
use lyon_path_builder::*;

// Create a builder object to build the path.
let mut builder = Path::builder();

// Build a simple path.
let mut builder = Path::builder();
builder.move_to(point(0.0, 0.0));
builder.line_to(point(1.0, 2.0));
builder.line_to(point(2.0, 0.0));
builder.line_to(point(1.0, 1.0));
builder.close();

// Generate the actual path object.
let path = builder.build();

for event in &path {
    println!("{:?}", event);
}
# }